package com.maddox.mworld.dao;

import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;
import androidx.room.Update;

import com.maddox.mworld.entity.Picture;

import java.util.List;

/**
 * picture table operation
 */
@Dao
public interface PictureDao {

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    void insert(Picture picture);

    @Delete
    void delete(Picture picture);

    @Update
    void update(Picture picture);

    @Query("select * from picture")
    List<Picture> queryPictures();

}
